import Vue from 'vue'
import VueRouter from 'vue-router'
import Index_Pc from '../components/index/Index_pc.vue'
import Index_M from '../components/index/Index_m.vue'
import Plan from'../components/about/Plan.vue'
import Donate from '../components/about/Donate.vue'
import Statistics from '../components/statistics/Statistics.vue'
import LottO from '../components/statistics/Lotto.vue'
import Ssq from '../components/statistics/Ssq.vue'
import DetailedLottoFront from '../components/statistics/detailed/DetailedLottoFront.vue'
import DetailedSsqEnd from '../components/statistics/detailed/DetailedSsqEnd.vue'
import DetailedSsqFront from '../components/statistics/detailed/DetailedSsqFront.vue'
Vue.use(VueRouter)
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
const routes = [{
    path: '/index_pc',
    name: 'index_pc',
    component: Index_Pc
  },
  {
    path: '/index_m',
    name: 'index_m',
    component: Index_M
  },{
    path: '/plan',
    name: 'plan',
    component: Plan

  },{
    path: '/donate',
    name: 'donate',
    component: Donate
  },
  {
    path: '/statistics',
    name: 'statistics',
    component: Statistics
  },
  {
    path: '/lotto',
    name: 'lotto',
    component: LottO
  },
  {
    path: '/ssq',
    name: 'ssq',
    component: Ssq
  },
  {
    path: '/detailedSsqEnd',
    name: 'detailedSsqEnd',
    component: DetailedSsqEnd
  },
  {
    path: '/detailedSsqFront',
    name: 'detailedSsqFront',
    component: DetailedSsqFront
  }
  ,
  {
    path: '/detailedLottoFront',
    name: 'detailedLottoFront',
    component: DetailedLottoFront
  }
  
  
]

const router = new VueRouter({
  routes
})

export default router